import org.junit.Test;

public class Test13 {
    @Test
    public void test1(){
        Child c =new Child();
        Base b =c;
        System.out.println(b.s);
        System.out.println(b.gg);
        b.staticTest();




        System.out.println(c.s);
        System.out.println(c.m);
        c.staticTest();

        //静态的按引用类型先来
        //
        System.out.println(new Child().m);
        Base jj= new Child();
        System.out.println(jj.m);
    }
}
class Base{
    public static String s= "static_base";
    public String m = "baseMMM";
    public String gg = "gg";
    public static void staticTest(){
        System.out.println("base static:"+s);
    }
}
class Child extends Base{
    public static String s= "child_base";
    public String m = "child";
    public static void staticTest(){
        System.out.println("child static:"+s);
    }
}

